<?php


class Collector extends Cosmo {
	private $_templateList = array() ;
	
	public function __construct() {
		parent::__construct() ;
		$this->_list =& $this->load->object('list', 'new') ;	
	}	
	public function setCollector($type) {
		switch(strtolower($type)) {
			case 'string' 	:
			case 'int' 	:
			case 'array' 	:
			case 'float' 	:
			case 'object' 	:
				$this->_list->setType(strtolower($type)) ;	
				break ;
			default  		: 
				$this->_list->setType('object', $type) ;
		}
	}
	public function push($content, $sKey = null) {
		if(is_null($sKey)) {
			return $this->_list->add($content) ;
		} else {
			if(is_object($content))
				return $this->_list->$sKey =& $content;
			else 
				return $this->_list->$sKey = $content;
		}
	}
	
	public function remove($sKey) {
	}
}

?>